 <meta charset="utf-8">
<div class="box box-primary" id="app_authApp_add">
            <form role="form" id="addForm">
              <div class="box-body">
                <div class="form-group">
                  <label for="appkey">APP编号</label>
                  <input type="text" name="appkey" v-model="appkey" class="form-control" id="appkey" placeholder="请输入模块编号"  required aria-required="true" >
                </div>
                
                <div class="form-group">
                  <label for="name">APP名称</label>
                  <input type="text" name="name"  v-model="name"  class="form-control" id="name" placeholder="请输入模块编号" required>
                </div>
                
                  <div class="form-group">
	                  <label for="enabled" >APP状态 </label>
	                   <select v-model="enabled"  class="form-control"  required >
					    <option  value="true">启 用</option>
					    <option value="false">禁 用</option>
					  </select>
                </div>
                
                <!--   <div class="form-group">
                  <label for="icon">显示图标</label>
                  <input type="text" name="icon"   v-model="icon"  class="form-control" id="icon" placeholder="请输入显示图标" >
                </div> -->
                
                <div class="form-group">
                  <label for="disIndex" >显示顺序 </label>
                   <input type="number" name="disIndex"   v-model="disIndex"  class="form-control" id="disIndex" placeholder="请输入显示顺序" required>
                </div>
                
                  
               <div class="form-group">
                  <label for="remark">描述</label>
                  <input type="text" name="remark"  v-model="remark"  class="form-control" id="remark" placeholder="备注">
                </div>
              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                 <button type="button" class="btn btn-default" v-on:click="cancle">取消</button>
                 <button type="button" class="btn btn-info pull-right"  v-kperms="{perm:'authApp:addAuthApp'}"  v-on:click="add">提交</button>
              </div>
            </form>

<script type="text/javascript">
new Vue({
        el: '#app_authApp_add',
        data: {
	        	appkey:'',
	        	name:'',
	        	icon:'',
	        	disIndex:'',
	        	remark:'',
	        	enabled:null
        	},
         methods: {
        	 add: function () {
        	    	if($("#addForm").valid()){
        	    		let _this=this;
        	    		let url="auth/authApp/addAuthApp";
        	    		zfesAjax.ajaxTodo(url,_this.$data, function(data){
        	    			alertSwal.successText(data.message);
        	    			layer.close(layer.index);
        	    		})
        	    	}
        	    },
        	    cancle:function(){
        	    	 layer.close(layer.index);
        	    	 
        	    }
        }
    });
 </script>
</div>